/**
 * 
 */
package abstractions;


import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Vector;

/**
 * @author rdru
 * INV: 
 */
public interface OpenDocInterface extends Remote {		// used by the Client
	/**
	 * 
	 */

	public int							id = 0;			// docId
	String			                    text = null;		// contents of the document
	public LinkedList<Integer>			editedBy = null;	// <userId, Usr>
	public Vector<LinkedList<CommandC>>	histOld = null;
	public HashMap<AtomId, Integer>		locked = null;		// <AtomId, userId>
	public LinkedList<Atom>				al = null;			// lista de atomos
	public HashMap<AtomId, Atom>		atomizer = null;	// cruzando atomos e seus respectivos atomIDs
	public int							atoms = 0;		// number of atoms
	public int							ups = 0;		// # updates sent
	public int							upr = 0;		// # updates recieved
	public int							n = 0;			// total # Commands recieved
	
	public void addUser(LoggedUser user) throws RemoteException;
	
	public void removeUser(LoggedUser user) throws RemoteException;
	
}


